/**
 * 底部Sheet样式
 * Story 5: Task 4
 */

.bottom-sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  transition: opacity 0.2s ease-out;
}

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.1);
  z-index: 999;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.bottom-sheet-handle-container {
  padding: 12px 0 8px;
  display: flex;
  justify-content: center;
  cursor: grab;
}

.bottom-sheet-handle-container:active {
  cursor: grabbing;
}

.bottom-sheet-handle {
  width: 36px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
}

.bottom-sheet-header {
  padding: 8px 20px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.bottom-sheet-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

.bottom-sheet-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px;
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
  .bottom-sheet {
    background: #1f1f1f;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.5);
  }

  .bottom-sheet-handle {
    background: #555;
  }

  .bottom-sheet-header {
    border-bottom-color: #333;
  }

  .bottom-sheet-title {
    color: #fff;
  }
}

/* 响应式调整 */
@media (min-width: 768px) {
  .bottom-sheet {
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    border-radius: 16px;
    bottom: 20px;
  }
}
